//2009/08/20 01:40:01
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class MultiRead
{
public:
    int minCycles(string trace, int procs)
    {
		int ret = 0;
		int count = 0;
		for(int i=0; i<trace.size(); i++)
		{
			if(trace[i] == 'W')
			{
				ret ++;
				count = 0;
			}
			else if(trace[i] == 'R')
			{
				if(count == 0) ret ++;
				count++;
			}
			if(count == procs)
			{
				count = 0;
			}
			cout << "ret: " << ret << endl;
		}
		return ret;
    }
};
